package io.github.talelin.sleeve.controller.v1;

import io.github.talelin.sleeve.module.kafka.KafkaProducerTest;
import io.github.talelin.sleeve.service.KafkaTestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Api(tags ="kafka测试")
@RequestMapping("kafka")
public class KafkaTestController {
    @Resource
    private KafkaProducerTest kafkaProducerTest;

    @PostMapping("/send")
    @ApiOperation("发送数据")
    public String kafkaTest(@RequestParam String message){
        kafkaProducerTest.pushKafkaTest(message);
        return "success";
    }

}
